package com.m1book.domain;

/**
 * ABook的当前状态不满足业务操作异常。
 * @author Frankie
 *
 */
public class ABookStateException extends Exception {
	private static final long serialVersionUID = -3183442411894098406L;
	
	private String message;

	public enum ExceptionMessage {
		ALREADY_DONAED("abook already donaed。"),
		NOT_DONAED("abook not donaed。");
		
		private String message;
		
		private ExceptionMessage(String message) {
			this.message = message;
		}

		public String getMessage() {
			return message;
		}
	}
	
	public ABookStateException(ExceptionMessage message) {
		this.message = message.message;
	}

	@Override
	public String getMessage() {
		return message;
	}

}
